<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="common::header"></head>
<body>
	<div class="layui-fluid">
		<div class="layui-row">
			<div class="layui-col-md6">
				<div class="layui-fluid">
					<div class="layui-card">
					  <div class="layui-card-header mlk-title layui-bg-cyan">字典类型列表</div>
					  <div class="layui-card-body">
						  <form class="layui-form">
							  <div class="layui-input-inline">
								  <input type="text"  autocomplete="off" placeholder="类别名称" class="layui-input" id="search_type_name">
							  </div>
							  <div class="layui-input-inline">
								  <input type="text"  autocomplete="off" placeholder="类别标识符" class="layui-input" id="search_type_desc">
							  </div>
							  <div class="layui-input-inline " style="width: 90px">
								  <a class="layui-btn layui-btn-normal" id="search_dict_type" href="#">
									  <i class="layui-icon" style="font-size: 20px; "></i> 搜索
								  </a>
							  </div>
						  </form>
					  	 <table lay-filter="dataType" class="layui-table" id="dataType"></table>
					  </div>
					</div>
				</div>
			</div>
			<div class="layui-col-md6">
				<div class="layui-fluid">
					<div class="layui-fluid">
					<div class="layui-card">
					  <div class="layui-card-header mlk-title layui-bg-cyan">数据字典列表</div>
					  <div class="layui-card-body">
					  	 <table lay-filter="dict" class="layui-table" id="dict"></table>
					  </div>
					</div>
				</div>
				</div>
			</div>
		</div>
	</div>
<script type="text/html" id="dataTypeToolBar">
<div class="layui-btn-container">
<button class="layui-btn layui-btn-sm" lay-event="addDataType">添加</button>
</div>
</script>
<script type="text/html" id="dictTool">
<div class="layui-btn-container">
<button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="delete">删除</button>
<button class="layui-btn layui-btn-sm layui-btn-warm" lay-event="update">更新</button>
</div>
</script>
<script type="text/html" id="dictToolbar">
<div class="layui-btn-container">
<button class="layui-btn layui-btn-sm" lay-event="addDict">新增</button>
</div>
</script>

<!--新增字典类型-->
	<div class="mlk-hide layui-fluid" id="addDictDialog">
		<form class="layui-form layui-form-pane" method="post" lay-filter="formFilter">
			<div class="layui-form-item">
				<label class="layui-form-label">类型名称</label>
				<div class="layui-input-block">
					<input type="text" name="typeName" required  lay-verify="required" placeholder="请输入字典类型名称" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">类型标识符</label>
				<div class="layui-input-block">
					<input type="text" name="typeDesc" required  lay-verify="required" placeholder="请输入字典类型标识符" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="dict_type_add">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary" id="dict_type_reset">重置</button>
				</div>
			</div>
		</form>
	</div>

<!-- 新增字典弹出层 -->
<div class="mlk-hide layui-fluid" id="dictDialog">
	<form class="layui-form layui-form-pane" method="post" lay-filter="formFilter">
	  <div class="layui-form-item">
	    <label class="layui-form-label">字典键</label>
	    <div class="layui-input-block">
	      <input type="text" name="dictKey" required  lay-verify="required" placeholder="请输入字典键" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">字典值</label>
	    <div class="layui-input-block">
	      <input type="text" name="dictValue" required  lay-verify="required" placeholder="请输入字典值" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item layui-form-text">
	    <label class="layui-form-label">备注信息</label>
	    <div class="layui-input-block">
	      <textarea name="dictRemark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
	    </div>
  	  </div>
  	  <div class="layui-form-item">
	    <div class="layui-input-block">
	      <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
	      <button type="reset" class="layui-btn layui-btn-primary" id="reset">重置</button>
	    </div>
	  </div>	  
	</form>
</div>

<!-- 更新 -->
<div class="mlk-hide layui-fluid" id="dictDialogUpdate">
	<form class="layui-form layui-form-pane" method="post" lay-filter="formFilterUpdate">
	  <input type="hidden" name="id" id="updateId">
	  <div class="layui-form-item">
	    <label class="layui-form-label">字典键</label>
	    <div class="layui-input-block">
	      <input type="text" name="dictKey" required  lay-verify="required" placeholder="请输入字典键" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">字典值</label>
	    <div class="layui-input-block">
	      <input type="text" name="dictValue" required  lay-verify="required" placeholder="请输入字典值" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item layui-form-text">
	    <label class="layui-form-label">备注信息</label>
	    <div class="layui-input-block">
	      <textarea name="dictRemark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
	    </div>
  	  </div>
  	  <div class="layui-form-item">
	    <div class="layui-input-block">
	      <button class="layui-btn" lay-submit lay-filter="update">立即提交</button>
	    </div>
	  </div>	  
	</form>
</div>

</body>
	<div th:include="common::footer"></div>
	<script type="text/javascript" th:src="@{/js/rbac/dict.js}"></script>
</html>